-
Notifications
You must be signed in to change notification settings - Fork 0
Pr/225 #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Pr/225 #1
Conversation
* Add nudge prompt for keeping the agent in repl using mode * Fix typos
* Updated the redirect url * Update update-readme.js Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
* Upload chatmode * Upload instructions * Update READMEs * Fix quotes in applyTo field in instructions * Revert other instructions
* Adding MCP Server to the README * Don't need that header * Changing summary text * Using aka.ms links * changing logo style to be consistent
* Add agents.md creation prompt * Refine description and clean up
Adds a new file containing instructions for Oqtane. This provides necessary documentation for setting up and using the Oqtane framework.
Introduces a new file with instructions for customizing GitHub Copilot behavior for Oqtane modules. Removes the old instruction file.
Provides instructions for customizing GitHub Copilot behavior for Oqtane module development, including code style, naming conventions, error handling, and performance optimization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @bialy69-git, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request significantly expands the repository's utility by adding specialized AI chat modes, detailed development instructions for specific platforms, and new prompts to enhance AI agent interaction. It also includes infrastructure updates to standardize installation links, making the content more accessible and user-friendly.
Highlights
- New Chat Mode: Azure Logic Apps Expert: Introduced a new chat mode designed to provide expert guidance on developing, optimizing, and troubleshooting Azure Logic Apps workflows, with a focus on Workflow Definition Language (WDL), integration patterns, and enterprise automation best practices.
- New Instruction Files for Azure Logic Apps & Power Automate: Added comprehensive guidelines for writing high-quality Azure Logic Apps and Microsoft Power Automate workflow definitions, covering best practices for triggers, actions, error handling, security, performance, and DevOps.
- New Instruction File for Oqtane Module Development: Included new instructions detailing best practices and patterns for developing Oqtane modules, focusing on Blazor code style, naming conventions, error handling, performance optimization, and API integration.
- New Prompt for AGENTS.md Generation: Added a new prompt to assist in generating a high-quality
AGENTS.mdfile, which provides structured context and instructions for AI coding agents working on a repository. - New Prompt for Interactive Programming Nudge: Introduced a new prompt to remind AI agents about interactive programming principles, emphasizing the use of REPLs for exploration and modification, and clear communication of tool usage to the user.
- Installation Link Standardization: Updated installation links across
README.mdandREADME.chatmodes.mdto use standardizedaka.msshort links, improving consistency and ease of access for VS Code and VS Code Insiders installations. - Debug Chat Mode Tool Refinement: The
debug.chatmode.mdfile has been updated to refine its list of available tools, streamlining the debugging capabilities provided by the chat mode.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces several new prompts, instructions, and chat modes, which are valuable additions. It also updates installation links to use a more standardized aka.ms shortener. My review focuses on a new instruction file that contains several typos.
| ## Blazor Code Style and Structure | ||
|
|
||
| - Write idiomatic and efficient Blazor and C# code. | ||
| - Follow .NET and Blazor conventions. | ||
| - Use Razor Components appropriately for component-based UI development. | ||
| - Use Balzor Components appropriately for component-based UI development. | ||
| - Prefer inline functions for smaller components but separate complex logic into code-behind or service classes. | ||
| - Async/await should be used where applicable to ensure non-blocking UI operations. | ||
|
|
||
|
|
||
| ## Naming Conventions | ||
|
|
||
| - Follow PascalCase for component names, method names, and public members. | ||
| - Use camelCase for private fields and local variables. | ||
| - Prefix interface names with "I" (e.g., IUserService). | ||
|
|
||
| ## Blazor and .NET Specific Guidelines | ||
|
|
||
| - Utilize Blazor's built-in features for component lifecycle (e.g., OnInitializedAsync, OnParametersSetAsync). | ||
| - Use data binding effectively with @bind. | ||
| - Leverage Dependency Injection for services in Blazor. | ||
| - Structure Blazor components and services following Separation of Concerns. | ||
| - Always use the latest version C#, currently C# 13 features like record types, pattern matching, and global usings. | ||
|
|
||
| ## Oqtane specific Guidelines | ||
|
|
||
| - Follow client server patterns for module development. | ||
| - The Client project has various modules in the modules folder. | ||
| - Each action in the client module is a seperate razor file that inherits from ModuleBase with index.razor being the default action. | ||
| - For complex client rocessing like getting data, create a service class that inherits from ServiceBase and lives in the services folder. One service class for each module. | ||
| - Client service should call server endpoint using ServiceBase methods | ||
| - Server project contains MVC Controllers, one for each module that match the client service calls. Each controller will call server-side services or repositories managed by DI | ||
| - Servier projects use repository peterns for modules, one reposioty class per module to match the controllers. | ||
|
|
||
| ## Error Handling and Validation | ||
|
|
||
| - Implement proper error handling for Blazor pages and API calls. | ||
| - Use built-in Oqtane logging methonds from base classes. | ||
| - Use logging for error tracking in the backend and consider capturing UI-level errors in Blazor with tools like ErrorBoundary. | ||
| - Implement validation using FluentValidation or DataAnnotations in forms. | ||
|
|
||
| ## Blazor API and Performance Optimization | ||
|
|
||
| - Utilize Blazor server-side or WebAssembly optimally based on the project requirements. | ||
| - Use asynchronous methods (async/await) for API calls or UI actions that could block the main thread. | ||
| - Optimize Razor components by reducing unnecessary renders and using StateHasChanged() efficiently. | ||
| - Minimize the component render tree by avoiding re-renders unless necessary, using ShouldRender() where appropriate. | ||
| - Use EventCallbacks for handling user interactions efficiently, passing only minimal data when triggering events. | ||
|
|
||
| ## Caching Strategies | ||
|
|
||
| - Implement in-memory caching for frequently used data, especially for Blazor Server apps. Use IMemoryCache for lightweight caching solutions. | ||
| - For Blazor WebAssembly, utilize localStorage or sessionStorage to cache application state between user sessions. | ||
| - Consider Distributed Cache strategies (like Redis or SQL Server Cache) for larger applications that need shared state across multiple users or clients. | ||
| - Cache API calls by storing responses to avoid redundant calls when data is unlikely to change, thus improving the user experience. | ||
|
|
||
| ## State Management Libraries | ||
|
|
||
| - Use Blazor's built-in Cascading Parameters and EventCallbacks for basic state sharing across components. | ||
| - use built-in Oqtane state management in the base classes like PageSate and SiteState when appripriate. | ||
| - Avoid adding extra depenencies like Fluxor or BlazorState when the application grows in complexity. | ||
| - For client-side state persistence in Blazor WebAssembly, consider using Blazored.LocalStorage or Blazored.SessionStorage to maintain state between page reloads. | ||
| - For server-side Blazor, use Scoped Services and the StateContainer pattern to manage state within user sessions while minimizing re-renders. | ||
|
|
||
| ## API Design and Integration | ||
|
|
||
| - Use service base methods to communicate with external APIs or server project backend. | ||
| - Implement error handling for API calls using try-catch and provide proper user feedback in the UI. | ||
|
|
||
| ## Testing and Debugging in Visual Studio | ||
|
|
||
| - All unit testing and integration testing should be done in Visual Studio Enterprise. | ||
| - Test Blazor components and services using xUnit, NUnit, or MSTest. | ||
| - Use Moq or NSubstitute for mocking dependencies during tests. | ||
| - Debug Blazor UI issues using browser developer tools and Visual Studio's debugging tools for backend and server-side issues. | ||
| - For performance profiling and optimization, rely on Visual Studio's diagnostics tools. | ||
|
|
||
| ## Security and Authentication | ||
|
|
||
| - Implement Authentication and Authorization using build-in Oqtane base class members like User.Roles. | ||
| - Use HTTPS for all web communication and ensure proper CORS policies are implemented. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file contains several typos that affect readability. I've corrected them in the suggestion below. Please review and apply the changes.
For example:
Balzorshould beBlazorseperateshould beseparateServier peternsshould beServer patterns
## Blazor Code Style and Structure
- Write idiomatic and efficient Blazor and C# code.
- Follow .NET and Blazor conventions.
- Use Razor Components appropriately for component-based UI development.
- Use Blazor Components appropriately for component-based UI development.
- Prefer inline functions for smaller components but separate complex logic into code-behind or service classes.
- Async/await should be used where applicable to ensure non-blocking UI operations.
## Naming Conventions
- Follow PascalCase for component names, method names, and public members.
- Use camelCase for private fields and local variables.
- Prefix interface names with "I" (e.g., IUserService).
## Blazor and .NET Specific Guidelines
- Utilize Blazor's built-in features for component lifecycle (e.g., OnInitializedAsync, OnParametersSetAsync).
- Use data binding effectively with @bind.
- Leverage Dependency Injection for services in Blazor.
- Structure Blazor components and services following Separation of Concerns.
- Always use the latest version C#, currently C# 13 features like record types, pattern matching, and global usings.
## Oqtane specific Guidelines
- Follow client server patterns for module development.
- The Client project has various modules in the modules folder.
- Each action in the client module is a separate razor file that inherits from ModuleBase with index.razor being the default action.
- For complex client processing like getting data, create a service class that inherits from ServiceBase and lives in the services folder. One service class for each module.
- Client service should call server endpoint using ServiceBase methods
- Server project contains MVC Controllers, one for each module that match the client service calls. Each controller will call server-side services or repositories managed by DI
- Server projects use repository patterns for modules, one repository class per module to match the controllers.
## Error Handling and Validation
- Implement proper error handling for Blazor pages and API calls.
- Use built-in Oqtane logging methods from base classes.
- Use logging for error tracking in the backend and consider capturing UI-level errors in Blazor with tools like ErrorBoundary.
- Implement validation using FluentValidation or DataAnnotations in forms.
## Blazor API and Performance Optimization
- Utilize Blazor server-side or WebAssembly optimally based on the project requirements.
- Use asynchronous methods (async/await) for API calls or UI actions that could block the main thread.
- Optimize Razor components by reducing unnecessary renders and using StateHasChanged() efficiently.
- Minimize the component render tree by avoiding re-renders unless necessary, using ShouldRender() where appropriate.
- Use EventCallbacks for handling user interactions efficiently, passing only minimal data when triggering events.
## Caching Strategies
- Implement in-memory caching for frequently used data, especially for Blazor Server apps. Use IMemoryCache for lightweight caching solutions.
- For Blazor WebAssembly, utilize localStorage or sessionStorage to cache application state between user sessions.
- Consider Distributed Cache strategies (like Redis or SQL Server Cache) for larger applications that need shared state across multiple users or clients.
- Cache API calls by storing responses to avoid redundant calls when data is unlikely to change, thus improving the user experience.
## State Management Libraries
- Use Blazor's built-in Cascading Parameters and EventCallbacks for basic state sharing across components.
- use built-in Oqtane state management in the base classes like PageState and SiteState when appropriate.
- Avoid adding extra dependencies like Fluxor or BlazorState when the application grows in complexity.
- For client-side state persistence in Blazor WebAssembly, consider using Blazored.LocalStorage or Blazored.SessionStorage to maintain state between page reloads.
- For server-side Blazor, use Scoped Services and the StateContainer pattern to manage state within user sessions while minimizing re-renders.
## API Design and Integration
- Use service base methods to communicate with external APIs or server project backend.
- Implement error handling for API calls using try-catch and provide proper user feedback in the UI.
## Testing and Debugging in Visual Studio
- All unit testing and integration testing should be done in Visual Studio Enterprise.
- Test Blazor components and services using xUnit, NUnit, or MSTest.
- Use Moq or NSubstitute for mocking dependencies during tests.
- Debug Blazor UI issues using browser developer tools and Visual Studio's debugging tools for backend and server-side issues.
- For performance profiling and optimization, rely on Visual Studio's diagnostics tools.
## Security and Authentication
- Implement Authentication and Authorization using built-in Oqtane base class members like User.Roles.
- Use HTTPS for all web communication and ensure proper CORS policies are implemented.
Pull Request Checklist
node update-readme.jsand verified thatREADME.mdis up to date.Description
Type of Contribution
Additional Notes
By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.